using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace System.Windows.Forms
{
	[ToolboxBitmap(typeof(NumericUpDown))]
	public partial class SelectUpDown : NumericUpDown
	{
		public SelectUpDown()
		{
			InitializeComponent();
			this.Enter += new EventHandler(SelectUpDown_Enter);
		}

		public SelectUpDown(IContainer container)
		{
			container.Add(this);

			InitializeComponent();
			this.Enter += new EventHandler(SelectUpDown_Enter);
		}

		void SelectUpDown_Enter(object sender, EventArgs e)
		{
			this.Select(0, this.Text.Length);
		}

		public int IntValue
		{
			get { return (int)this.Value; }
			set { this.Value = (decimal)value; }
		}
	}
}
